package com.caregiver.watch.business.user.enums;

import lombok.Getter;

/**
 * @Description: 用户状态
 * @Author 疆戟
 * @Date 2025/8/15 0:26
 * @Version 1.0
 */
@Getter
public enum UserStatusEnum {

    NORMAL(0, "正常"),

    DISABLE(1, "禁用");


    private final Integer code;
    private final String desc;

    UserStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static UserStatusEnum pares(Integer code) {
        for (UserStatusEnum value : UserStatusEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
